<?php

namespace SmmsSdk\App;

use SmmsSdk\Core\Api;

class Image extends Api
{

    public function clear()
    {
        return $this->request('GET', '/clear', ['format' => 'json']);
    }

    public function history()
    {
        return $this->request('GET', '/history', ['format' => 'json']);
    }


    public function delete(string $hash)
    {
        return $this->request('GET', '/delete/' . $hash, ['hash' => $hash, 'format' => 'json']);
    }

    public function upload_history($page = 1)
    {
        return $this->request('GET', '/upload_history', ['page' => $page, 'format' => 'json'], ['Content-Type' => 'multipart/form-data']);
    }

    public function upload($file)
    {
        return $this->request('POST', '/upload', ['format' => 'json'], ['Content-Type' => 'multipart/form-data'], ['smfile' => $file]);
    }



}